


        
          /*function fall(ele){
                var list = [];
                for(var l = 0;l < $(ele).children('.temporary').children('li').length;l++){
                    list.push($(ele).children('.temporary').children('li')[l]);
                }
                var min = 0;
                for(var i = 0;i < list.length;i++){
                    for(var h = 0;h < $(ele).children('div').children('ul').length;h++){
                        if($(ele).children('div').children('ul')[h].offsetHeight < $(ele).children('div').children('ul')[min].offsetHeight){
                            min = h;
                        }
                    }
                    $(ele).children('div').children('ul:eq(' + min +')').append(list[i]);
                }
          }*/
          var watchWindowWidth = null;
          $(document).ready(function(){
               
                if(window.innerWidth >= 1024){
                    $('.grid').masonry({gutter:80});
                    $('.grid')[0].gutter = 80;
                }else if(window.innerWidth >= 768 && window.innerWidth < 1023){
                    $('.grid').masonry({gutter:40});
                    $('.grid')[0].gutter = 40;
                }else{
                    $('.grid').masonry({gutter:0});
                    $('.grid')[0].gutter = 0;
                }
                $('.grid').masonry({
                    itemSelector:'.grid-item',
                    columnWidth:'.grid-sizer',
                    percentPosition:true,
                    resize:true
                });
                watchWindowWidth = setInterval(function(){
                    if(window.innerWidth >= 1024){
                        if($('.grid')[0].gutter == 80) return false;
                        $('.grid').masonry({gutter:80});
                        $('.grid')[0].gutter = 80;
                    }else if(window.innerWidth >= 768 && window.innerWidth < 1023){
                        if($('.grid')[0].gutter == 40) return false;
                        $('.grid').masonry({gutter:40});
                        $('.grid')[0].gutter = 40;
                    }else{
                        if($('.grid')[0].gutter == 0) return false;
                        $('.grid').masonry({gutter:0});
                        $('.grid')[0].gutter = 0;
                    }
                })
                /*for(var p = 0;p < $('.news .contn .page').length;p++){
                    var eleSelector =  '.news .contn .page:eq(' + p + ')';
                    fall(eleSelector);
                }*/
                
                
                
          })